﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EzDesk.DesktopClient.ViewContract;
using EzDesk.MVVMBase;
using EzDesk.DesktopClient.Event;
using System.Windows;
using EzDesk.DesktopClient.MVVMEnhance;

namespace EzDesk.DesktopClient.ViewModel
{
    public class FunctionPageViewModel : ViewModelWithSingleContainer<IFunctionPageView>
    {
        private string _url;

        public string Url
        {
            get { return _url; }
            set
            {
                _url = value;
                RaisePropertyChanged("Url");
                this.View.Navigate(_url);
            }
        }


        public FunctionPageViewModel()
            : base()
        {
        }
        public FunctionPageViewModel(string url):base()
        {
            this.Url = url;
        }


        public void Navigate(string url)
        {
            try
            {
                this.Url = url;
            }
            catch
            { }
        }
    }
}
